3.3.92 \(\int \sqrt {\frac {-a+b x^n}{x^2}} \, dx\)

Optimal. Leaf size=63 \[ \frac {2 x \sqrt {b x^{n-2}-\frac {a}{x^2}}}{n}+\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {b x^{n-2}-\frac {a}{x^2}}}\right )}{n} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {1979, 2007, 2029, 203} \begin {gather*} \frac {2 x \sqrt {b x^{n-2}-\frac {a}{x^2}}}{n}+\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {b x^{n-2}-\frac {a}{x^2}}}\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[(-a + b*x^n)/x^2],x]

[Out]

(2*x*Sqrt[-(a/x^2) + b*x^(-2 + n)])/n + (2*Sqrt[a]*ArcTan[Sqrt[a]/(x*Sqrt[-(a/x^2) + b*x^(-2 + n)])])/n

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1979

Int[(u_)^(p_), x_Symbol] :> Int[ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && GeneralizedBinomialQ[u, x] &&  !Gene
ralizedBinomialMatchQ[u, x]

Rule 2007

Int[((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[(x*(a*x^j + b*x^n)^p)/(p*(n - j)), x] + Dist
[a, Int[x^j*(a*x^j + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, j, n}, x] && IGtQ[p + 1/2, 0] && NeQ[n, j] && EqQ[
Simplify[j*p + 1], 0]

Rule 2029

Int[(x_)^(m_.)/Sqrt[(a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.)], x_Symbol] :> Dist[-2/(n - j), Subst[Int[1/(1 - a*x^2
), x], x, x^(j/2)/Sqrt[a*x^j + b*x^n]], x] /; FreeQ[{a, b, j, n}, x] && EqQ[m, j/2 - 1] && NeQ[n, j]

Rubi steps

\begin {align*} \int \sqrt {\frac {-a+b x^n}{x^2}} \, dx &=\int \sqrt {-\frac {a}{x^2}+b x^{-2+n}} \, dx\\ &=\frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}-a \int \frac {1}{x^2 \sqrt {-\frac {a}{x^2}+b x^{-2+n}}} \, dx\\ &=\frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}+\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,\frac {1}{x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}\right )}{n}\\ &=\frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}+\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}\right )}{n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 78, normalized size = 1.24 \begin {gather*} \frac {x \sqrt {\frac {b x^n-a}{x^2}} \left (2 \sqrt {b x^n-a}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {b x^n-a}}{\sqrt {a}}\right )\right )}{n \sqrt {b x^n-a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[(-a + b*x^n)/x^2],x]

[Out]

(x*Sqrt[(-a + b*x^n)/x^2]*(2*Sqrt[-a + b*x^n] - 2*Sqrt[a]*ArcTan[Sqrt[-a + b*x^n]/Sqrt[a]]))/(n*Sqrt[-a + b*x^
n])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.10, size = 81, normalized size = 1.29 \begin {gather*} \frac {x \sqrt {\frac {b x^n-a}{x^2}} \left (\frac {2 \sqrt {b x^n-a}}{n}-\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {b x^n-a}}{\sqrt {a}}\right )}{n}\right )}{\sqrt {b x^n-a}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[Sqrt[(-a + b*x^n)/x^2],x]

[Out]

(x*Sqrt[(-a + b*x^n)/x^2]*((2*Sqrt[-a + b*x^n])/n - (2*Sqrt[a]*ArcTan[Sqrt[-a + b*x^n]/Sqrt[a]])/n))/Sqrt[-a +
 b*x^n]

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 118, normalized size = 1.87 \begin {gather*} \left [\frac {2 \, x \sqrt {\frac {b x^{n} - a}{x^{2}}} + \sqrt {-a} \log \left (\frac {b x^{n} - 2 \, \sqrt {-a} x \sqrt {\frac {b x^{n} - a}{x^{2}}} - 2 \, a}{x^{n}}\right )}{n}, \frac {2 \, {\left (x \sqrt {\frac {b x^{n} - a}{x^{2}}} - \sqrt {a} \arctan \left (\frac {x \sqrt {\frac {b x^{n} - a}{x^{2}}}}{\sqrt {a}}\right )\right )}}{n}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-a+b*x^n)/x^2)^(1/2),x, algorithm="fricas")

[Out]

[(2*x*sqrt((b*x^n - a)/x^2) + sqrt(-a)*log((b*x^n - 2*sqrt(-a)*x*sqrt((b*x^n - a)/x^2) - 2*a)/x^n))/n, 2*(x*sq
rt((b*x^n - a)/x^2) - sqrt(a)*arctan(x*sqrt((b*x^n - a)/x^2)/sqrt(a)))/n]

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {b x^{n} - a}{x^{2}}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-a+b*x^n)/x^2)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt((b*x^n - a)/x^2), x)

________________________________________________________________________________________

maple [A]  time = 1.99, size = 105, normalized size = 1.67 \begin {gather*} -\frac {2 \sqrt {\frac {b \,{\mathrm e}^{n \ln \relax (x )}-a}{x^{2}}}\, \sqrt {a}\, x \arctan \left (\frac {\sqrt {b \,{\mathrm e}^{n \ln \relax (x )}-a}}{\sqrt {a}}\right )}{\sqrt {b \,{\mathrm e}^{n \ln \relax (x )}-a}\, n}-\frac {2 \left (-b \,{\mathrm e}^{n \ln \relax (x )}+a \right ) \sqrt {\frac {b \,{\mathrm e}^{n \ln \relax (x )}-a}{x^{2}}}\, x}{\left (b \,{\mathrm e}^{n \ln \relax (x )}-a \right ) n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((b*x^n-a)/x^2)^(1/2),x)

[Out]

-2*(a-b*exp(n*ln(x)))/n/(b*exp(n*ln(x))-a)*((b*exp(n*ln(x))-a)/x^2)^(1/2)*x-2*a^(1/2)/n*arctan((b*exp(n*ln(x))
-a)^(1/2)/a^(1/2))*((b*exp(n*ln(x))-a)/x^2)^(1/2)/(b*exp(n*ln(x))-a)^(1/2)*x

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {b x^{n} - a}{x^{2}}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-a+b*x^n)/x^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt((b*x^n - a)/x^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {-\frac {a-b\,x^n}{x^2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-(a - b*x^n)/x^2)^(1/2),x)

[Out]

int((-(a - b*x^n)/x^2)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {- a + b x^{n}}{x^{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-a+b*x**n)/x**2)**(1/2),x)

[Out]

Integral(sqrt((-a + b*x**n)/x**2), x)

________________________________________________________________________________________